package me.gerry.locktest.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import me.gerry.locktest.monitor.ScreenOffMonitor;
import me.gerry.locktest.monitor.ScreenOnMonitor;

public class LockService extends Service {

    private ScreenOffMonitor screenOffMonitor;
    private ScreenOnMonitor screenOnMonitor;

    public LockService() {
    }

    @Override
    public IBinder onBind(Intent arg0) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        screenOffMonitor = new ScreenOffMonitor(this);
        screenOffMonitor.register();

        screenOnMonitor = new ScreenOnMonitor(this);
        screenOnMonitor.register();

    }

    @Override
    public void onDestroy() {
        super.onDestroy();

        screenOffMonitor.unregister();
        screenOnMonitor.unregister();
    }
}
